finding the vertex of a quadratic function